Displays a modal dialog box centered in the screen.
Syntax
MessageBox(cText, cTitle, nType)
cText
Specifies the contents in dialog box.
ctitle
Specifies the title of dialog box window.
ntype
Specifies the type of dialog box as follows:
nType | Type |
0 | MB_OK |
1 | MB_OKCANCEL |
2 | MB_ABORTRETRYIGNORE |
3 | MB_YESNOCANCEL |
4 | MB_YESNO |
5 | MB_RETRYCANCEL |
16 | MB_ICONSTOP |
32 | MB_ICONQUESTION |
48 | MB_ICONEXCLAMATION |
64 | MB_ICONINFORMATION |
Return Type
Numeric
Remarks
MessageBox( ) returns a value indicating the button that the user clicked.
Return value | ID of button clicked |
1 | idok |
2 | idcancel |
3 | idabort |
4 | idretry |
5 | idignore |
6 | idyes |
7 | idno |